<template>
    <div id="ks">
        <div class="container">
            <!--  -->
            <div class="title">
                <div class="stitle">
                    {{ beikao.classname }}
                </div>
                
            </div>
            <!--  -->
            <div class="content">
                <div class="info_list" v-for="(item,index) in beikao.children" :key="index">
                    <div class="info_title" @click="showArt(item.id)">
                        {{ item.title }}
                    </div>
                    <!-- <div class="time">
                        02-10
                    </div> -->
                </div>
                
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        props: {
            beikao: Object
        },
        data() {
            return {
                artList: []
            }
        },
        computed: {
            newList() {
                return this.beikao.erji 
            },
            title() {
                return this.beikao.classname
            },
            xueliid() {
                return this.$store.state.schoolData.xueliid
            },
        },
        watch: {
            xueliid() {
                // this.getArtList()
            }
        },
        
        methods: {
            // 查看文章
            showArt( id ) {
                this.$router.push(`/artical/${id}/erji`)
            },

        },
    }
</script>

<style lang="scss" scoped>
#ks {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 0;
    .container {
        width: 1200px;
        box-sizing: border-box;
        margin: 0 auto;
        padding-top: 10px;
        background-color: #fff;
        .title {
            font-size: 18px;
            padding: 10px 0;
            padding-left: 30px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 20px;
            border-bottom: 1px solid #f2f2f2;
            .stitle {
                width: 100px;
                text-align: center;
                border-left: 2px solid #999;
            }
            .title_list {
                display: flex;
                .title_item {
                    font-size: 14px;
                    width: 100px;
                    cursor: pointer;
                    text-align: center;
                    color: #999999;
                    position: relative;
                    left: 0;
                    top: 0;
                    &::after {
                        width: 2px;
                        height: 2px;
                        border-radius: 50%;
                        content: "";
                        background-color: #000;
                        position: absolute;
                        right: 0;
                        top: 8px;
                    }
                    &:last-child {
                        &::after {
                            content: "";
                            width:0;
                            height: 0;
                        }
                    }
                }
            }
        }
        .content {
            padding: 20px;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-wrap: wrap;
            .info_list {
                width: 370px;
                box-sizing: border-box;
                display: flex;
                align-items: center;

                cursor: pointer;
                margin: 10px 0 10px 10px;
                &:hover {
                    color: #007eff;
                }
                .info_title {
                    width: 300px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
                .time {
                    width: 60px;
                    text-align: left;
                    margin-left: 10px;
                    border-right: 1px dashed #f2f2f2;
                    // color:red;
                }
            }
        }
    }
}
</style>